package com.frame.pageform.component.tree;

import java.util.ArrayList;
import java.util.List;

public class TreeNode {

	private String text;
	private String id;
	private String url;
	private String icon;
	private Integer childSize;
	private String preId;//
	private boolean checked=false;
	private List childList;
	private boolean hideCheckbox;
	/**
	 *是否动态加载此节点
	 */
	private boolean isLazy;
	/**
	 * 是否展开此节点
	 */
	private boolean expand;

	private Integer orderId;

	/**
	 * 权限信息
	 */
	private String auth;
	/**
	 * 扩展属性1
	 */
	private String attribute1;
	/**
	 * 扩展属性2
	 */
	private String attribute2;

	public TreeNode(String id,String pid,String text){
		this.id=id;
		this.preId=pid;
		this.text=text;
	}
	public TreeNode(String id,String pid,Integer childSize,String text){
		this.id=id;
		this.preId=pid;
		this.childSize=childSize;
		this.text=text;
	}
	public TreeNode(String id,String pid,Integer childSize,String text,boolean checked){
		this.id=id;
		this.preId=pid;
		this.childSize=childSize;
		this.text=text;
		this.checked=checked;
	}

	public Integer getChildSize() {
		return childSize;
	}

	public void setChildSize(Integer childSize) {
		this.childSize = childSize;
	}

	public void addChild(TreeNode node){
		if(childList==null)childList=new ArrayList();
		childList.add(node);
	}

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getPreId() {
		return preId;
	}
	public void setPreId(String preId) {
		this.preId = preId;
	}
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}
	public List getChildList() {
		return childList;
	}
	public void setChildList(List childList) {
		this.childList = childList;
	}
	public boolean isLazy() {
		return isLazy;
	}
	public void setLazy(boolean isLazy) {
		this.isLazy = isLazy;
	}
	public boolean isExpand() {
		return expand;
	}
	public void setExpand(boolean expand) {
		this.expand = expand;
	}
	public Integer getOrderId() {
		return orderId;
	}
	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public String getAuth() {
		return auth;
	}
	public void setAuth(String auth) {
		this.auth = auth;
	}
	public String getAttribute1() {
		return attribute1;
	}
	public void setAttribute1(String attribute1) {
		this.attribute1 = attribute1;
	}
	public String getAttribute2() {
		return attribute2;
	}
	public void setAttribute2(String attribute2) {
		this.attribute2 = attribute2;
	}
	public boolean isHideCheckbox() {
		return hideCheckbox;
	}
	public void setHideCheckbox(boolean hideCheckbox) {
		this.hideCheckbox = hideCheckbox;
	}

}
